<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%--头部导航开始--%>
<jsp:include page="head.jsp"/>
<!--头部导航结束-->
<%--中间内容开始--%>
<div class="layui-container fly-marginTop">
    <div class="fly-panel" pad20 style="padding-top: 5px;">
        <!--<div class="fly-none">没有权限</div>-->
        <div class="layui-form layui-form-pane">
            <div class="layui-tab layui-tab-brief" lay-filter="user">
                <ul class="layui-tab-title">
                    <li class="layui-this">发布博客</li>
                </ul>
                <div class="layui-form layui-tab-content" id="LAY_ucm" style="padding: 20px 0;">
                    <div class="layui-tab-item layui-show">
                        <form:form action="add.do" method="post">
                            <div class="layui-row layui-col-space15 layui-form-item">
                                <div class="layui-col-md3">
                                    <label class="layui-form-label">选择分类</label>
                                    <div class="layui-input-block">
                                        <select lay-verify="required" name="tId" >
                                            <option value="">请选择</option>
                                            <c:forEach items="${type}" var="type">
                                                <option value="${type.tId}">${type.tName}</option>
                                            </c:forEach>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-col-md9">
                                    <label for="L_title" class="layui-form-label">标题</label>
                                    <div class="layui-input-block">
                                        <input type="text" id="L_title" name="bTitle" required lay-verify="required" autocomplete="off" class="layui-input">

                                    </div>
                                </div>
                            </div>

                            <div class="layui-form-item layui-form-text">
                                <!--百度富文本编辑器-->
                                <textarea id="bContent" name="bContent" type="text/plain" style="width:100%;height:500px;"></textarea>

                            </div>
                            <div class="layui-form-item">
                                <button class="layui-btn" type="submit" lay-filter="*" lay-submit>立即发布</button>
                            </div>
                        </form:form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<%--中间内容结束--%>
<!-- 底部开始 -->
<jsp:include page="bottom.jsp"/>
<!-- UEditor 编辑器实例化 -->
<script type="text/javascript">
    //实例化编辑器
    //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
    var ue = UE.getEditor('bContent', {topOffset:61});//编辑器浮动时，距离顶部80px
    // UE.getEditor('editor', {topOffset:50});
</script>
<!-- 底部结束-->